package org.darcy.service;

import java.util.List;
import java.util.Map;

import org.darcy.entity.BizComment;
import org.darcy.framework.blog.exception.BlogCommentException;
import org.darcy.framework.generic.GenericService;
import org.darcy.model.BizCommentModel;

import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * 评论
 */
public interface BizCommentService extends GenericService<BizComment> {

	/**
	 * 综合查询
	 */
	IPage<BizCommentModel> query(BizCommentModel param);

	Map<String, Object> list(BizCommentModel vo);

	/**
	 * admin发表评论
	 *
	 * @param comment
	 * @return
	 */
	void commentForAdmin(BizComment comment) throws BlogCommentException;

	/**
	 * 发表评论
	 *
	 * @param comment
	 * @return
	 */
	BizComment comment(BizComment comment) throws BlogCommentException;

	/**
	 * 查询近期评论
	 *
	 * @param pageSize
	 * @return
	 */
	List<BizCommentModel> listRecentComment(int pageSize);

	/**
	 * 查询未审核的评论
	 *
	 * @param pageSize
	 * @return
	 */
	List<BizCommentModel> listVerifying(int pageSize);

	/**
	 * 点赞
	 *
	 * @param id
	 */
	void doSupport(Long id);

	/**
	 * 点踩
	 *
	 * @param id
	 */
	void doOppose(Long id);
}
